home *** CD-ROM | disk | FTP | other *** search
- L_Welcome_MsgBox_Message_Text = "This script demonstrates DameWare UserList using the Windows Scripting Host."
- L_Welcome_MsgBox_Title_Text = "DameWare Windows Scripting Host Sample"
- CrLf = chr(13) & chr(10)
- MyTab = chr(9)
-
- Call Welcome()
-
- Dim DCtl1
- Set DCtl1 = Wscript.CreateObject("DameWare.UserListCtl.1")
-
- DCtl1.Machine = DCtl1.GetLocalMachineName
- DCtl1.SetFirstUser
-
- Dim strUsers
-
- While DCtl1.UserGetNext <> 0
- strUsers = strUsers & DCtl1.UserName & MyTab & DCtl1.UserFullName & _
- MyTab & DCtl1.Usercomment & CrLf
- Wend
-
- MsgBox "User Information: " & CrLf & strUsers
-
- Set DCtl1 = Nothing
-
- Sub Welcome()
- Dim intDoIt
-
- intDoIt = MsgBox(L_Welcome_MsgBox_Message_Text, _
- vbOKCancel + vbInformation, _
- L_Welcome_MsgBox_Title_Text )
- If intDoIt = vbCancel Then
- WScript.Quit
- End If
- End Sub